3 subject="""comment 2"""
4 date="2025-01-09T17:38:25Z"
6 Seems like a reasonable idea to have a hook that runs before `git-annex
7 init` does any of its probing or configuration.
9 As for generalizing to a hook that is run before each git-annex command,
10 putting it in .git/hooks seems like it could cause a fair bit of extra work
11 probing if the hook(s) exist, especially in cases where git-annex runs git
12 which might run git-annex again repeatedly.
14 There could be a generalized hook config, eg `git config annex.pre-hook
15 my-hook` could make `git-annex init` run `my-hook git-annex init`
16 and same for other git-annex commands.
18 It sounds like you would want a failure of such a hook to prevent the
19 git-annex command from running. Is that right?
21 Worth bearing in mind that if such a hook output to stdout, or read from
22 stdin, or for that matter was interactive on /dev/tty, it could badly
23 mess up things that use git-annex as plumbing. Including git, in the case
26 (Should this todo be tagged repronim btw?)